<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>删除文件</title>

    <!--    屏幕自适应-->
    <script name="viewport" content="width=device-width, initial-scale=1"></script>
    <!--    引入bootstrap-->
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.min.css">

    <!--    bootstrap依赖jQuery-->
    <script src="js/jquery.min.js"></script>
    <script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <script src="js/http.js"></script>

</head>
<body>
<button onclick="deleteDocument()">删除</button>
</body>
</html>
<script>
    let documentId=13;
    function deleteDocument() {
        $.ajax({
            type:"post",
            url:"http://localhost:8080/netdisc/document/document/delete",
            data:{
                documentId:documentId,
            },
            success:function (resp) {
                let parse = JSON.parse(resp);
                let data = parse.data;
                if(data==1){
                    console.log(parse.message)
                }
            }
        })
    }
</script>